<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    .box {
      height: 400px;
      width: 400px;
      border: 2px solid #333;
    }
    .box1 {
      height: 250px;
      width: 250px;
      background: red;
    }
    .box2 {
      height: 100px;
      width: 100px;
      background: blueviolet;
    }
  </style>
</head>
<body>

<div id="app">
  <h1>{{ msg }}</h1>

  <button @click="sayHi('按钮一', $event)">按钮一</button>
  <button @click="sayHi('按钮二', $event)">按钮二</button>
  <button @click="handleClick">按钮三</button>
  <div
    class="box"
    @mousemove="move"
    @click.stop="handleClick('box', $event)"
    @contextmenu.prevent.once="handleContextmenu"
  >
    <div class="box1" @click.stop="handleClick('box11111', $event)">
      <div class="box2"  @click.stop="handleClick('box222222', $event)"></div>
    </div>
  </div>

  <input type="text" v-model="msg" @keydown="handleChange">
  <br>
<!--  <input type="text" v-model="msg" @keydown.enter="handleChange">-->
<!--  <input type="text" v-model="msg" @keydown.enter.shift="handleChange">-->
  <input type="text" v-model="msg" @keydown.13="handleChange">
  <br>
  <input type="text" v-model="msg" @keydown.space="handleChange">
</div>

<script src="js/vue.js"></script>
<script src="js/index.js"></script>
</body>
</html>
